package com.bjpowernode;

import com.bjpowernode.task.TaskManager;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * 添加定时器注解
 */
@EnableScheduling
@SpringBootApplication
public class MircoTaskApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext ct = SpringApplication.run(MircoTaskApplication.class, args);

        TaskManager taskManager = (TaskManager) ct.getBean("taskManager");

        taskManager.generateIncomePlan();

        taskManager.generateIncomeBack();
    }

}
